<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:dt="http://github.com/dandelion/datatables"
	xmlns:crm="http://www.thymeleaf.org/crm">

<head th:replace="fragment/common :: header">

</head>

<body>

	<div th:replace="fragment/common :: topnav"></div>
	<div id="wrap">

		<div class="container-fluid">
			<div class="row">
				<div class="span8">
					<h4>Potentials</h4>
				</div>

				<div class="span4 pull-right">
					<div class="btn-group pull-right">
						<a class="btn btn-primary" href="new"> <i
							class="fa fa-plus-square"></i> New Potential
						</a> 
						<!-- 
						<a class="btn btn-warning" href="importstart"> <i
							class="fa fa-upload"></i> Import Potentials
						</a>
						 -->
					</div>
				</div>
			</div>

			<div class="row-fluid">

				<div class="alert alert-success" th:if="${message != null}">
					<button type="button" class="close" data-dismiss="alert">&times;</button>
					<span th:text="${message}"></span>
				</div>


				<table id="leads" dt:table="true" dt:theme="bootstrap2"
					class="table table-striped table-bordered">

					<thead>

						<tr>
							<th>Name</th>
							<th>Sales Stage</th>
							<th>Lead Source</th>
							<th>Excepted Close Date</th>
							
						</tr>
					</thead>
					<tbody>
						<tr th:each="l : ${potentialList}">
							<td><a th:href="@{/potential/details(id=${l.id},view=true)}"
								th:text="${l.name}">view</a></td>
							<td><a th:href="@{/potential/details(id=${l.id},view=true)}"
								th:text="#{${l.salesStage.key}}">view</a></td>
							
							<td class="center"><a
								th:href="@{/potential/details(id=${l.id},view=true)}"
								th:text="#{${l.leadSource.key}}">view</a></td>
							<td class="center"><a
								th:href="@{/potential/details(id=${l.id},view=true)}"
								th:text="${l.closeDate}">view</a></td>
						</tr>

					</tbody>
				</table>



			</div>

		</div>


		<div id="push"></div>
	</div>




</body>
</html>